
{extend name="layout:base" /}{block name="content"}
 <?php
$global=isSupperManagerForSession();
 ?>
<style type="text/css">
  .yg_inp>input{margin-bottom: 10px;}
#zc_detail table{margin:10px;}
#zc_detail table tr td{
	border: 1px solid #ddd;
	height:30px;
	padding-left:5px;
	padding-right:5px;
} 
</style>


<section class="topBanners">
         <div class="icon"></div>
         <div class="topBannersNav">
         <span onclick="ContentLoadGo('/admin/index/index')">密码修改</span>

         </div>
      </section>
       <form autocomplete="off">
    <ul class="ulColumn2">
       <li>
        <span class="item_name" style="width:120px;">登录账号：</span>
        <?php
         echo $info['uname'];
        ?>
       </li>
       <li>
        <span class="item_name" style="width:120px;">姓名：</span>
        <?php
         echo $info['nickname'];
        ?>
       </li>
       <li>
        <span class="item_name" style="width:120px;">部门：</span>
        <?php
       
        
  if(!empty($userDepList[$info['type']]))
	{
      echo '<br>['.$userDepList[$info['depid']]['depname']."]";
   }
   else
{
 echo "[".$userDepList[$info['first_depid']]['depname']."]";
}
        ?>
       
       </li>
       <li>
        <span class="item_name" style="width:120px;">角色：</span>
        <?php
         echo getMyAllGoupNameString(getUserAllGroup($info['id']));
        ?>
       </li>
       
       
       <li>
        <span class="item_name" style="width:120px;">新密码：</span>
       <input type="password" id="pwd" name="pwd" class="textbox textbox_295" placeholder="新密码..."/>
       </li>
       <li>
        <span class="item_name" style="width:120px;">再次输入密码：</span>
       <input type="password" id="pwd1" name="pwd1" class="textbox textbox_295" placeholder="新密码..."/>
       </li>
       
       <li>
        <span class="item_name" style="width:120px;"></span>
        <input type="button" value="修改" class="link_btn updatePWDBtn"/>
       </li>
       
      </ul>
      </form>
   
     
     
       <script type="text/javascript">
      
      function myResearch(){
		   var url="/admin/index/index";
		  
		   var param={
				
		   };
		   ContentLoadGo(url,param);
	   }
     
      
           $(function(){
        	   //设置搜索栏
        	   $(".research").click(function(){
        		  
        		   myResearch();
        		   
        	   });
        	   
        	   
        
        	   
        	   //导航
         	   $(".topBannerItem").click(function(){
         		   
         		   var attArr = $(this).attr();
             	   goToSelfLink(attArr);
             	   
         			
         	   });

        	   $(".updatePWDBtn").click(function(){
        		   var that =this;
        		   var url="/admin/index/index";
        		   var pwd = $("#pwd").val();
        		   var pwd1 = $("#pwd1").val();
        		   if(pwd=="")
        		   {
        			   ErrTiShi("新密码不能够为空");
        			   return false;
        		   }
        		   if(pwd!=pwd1)
        		   {
        			   ErrTiShi("两次密码输入不一致");
        			   return false;
        		   }
        		   var param={
        				   psw:pwd,
        				   sys_opt:"updatePWD"
        		   };
        		   
        		   
        		   AjaxRequest(url,param,function(data){
        			   if(data.err==0)
        			   {
        				   SuccessTiShi("操作成功");
        				   myResearch();
        			   }
        			   else
        			   {
        				   ErrTiShi("操作失败");
        			   }
        		   });
    			   
        				 
        				
        			 //弹出：确认按钮
        			
        	   });
        	   
        	  
        	  
  			   //全选
  		
  				$("#all").click(function(){   
			    	if(this.checked){   
			        	$(".checkBoxInput").attr("checked", true);  
			        	$(".checkBoxInput").prop("checked", true);  
			    	}else{   
						$(".checkBoxInput").attr("checked", false);
						$(".checkBoxInput").prop("checked", false);
			    	}   
			    	var se=getAllSelectItem();
			    	//console.log(se);
			 	}); 
  			
  			
  			
           });
           
	  </script>
	  
	 {/block}